package com.star.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author Star
 * @since 2021-04-21
 */
@TableName("tb_resource")
public class Resource extends Model<Resource> {

    private static final long serialVersionUID = 1L;

    /**
     * 资源编号
     */
    @TableId(value = "res_id", type = IdType.AUTO)
    private Integer resId;
    /**
     * 资源名称
     */
    private String resName;
    /**
     * 资源路径
     */
    private String resUrl;
    /**
     * 父级资源编号
     */
    private Integer resParent;
    /**
     * 资源等级
     */
    private Integer resLevel;
    /**
     * 是否被删除
     */
    private Integer resDelete;


    public Integer getResId() {
        return resId;
    }

    public void setResId(Integer resId) {
        this.resId = resId;
    }

    public String getResName() {
        return resName;
    }

    public void setResName(String resName) {
        this.resName = resName;
    }

    public String getResUrl() {
        return resUrl;
    }

    public void setResUrl(String resUrl) {
        this.resUrl = resUrl;
    }

    public Integer getResParent() {
        return resParent;
    }

    public void setResParent(Integer resParent) {
        this.resParent = resParent;
    }

    public Integer getResLevel() {
        return resLevel;
    }

    public void setResLevel(Integer resLevel) {
        this.resLevel = resLevel;
    }

    public Integer getResDelete() {
        return resDelete;
    }

    public void setResDelete(Integer resDelete) {
        this.resDelete = resDelete;
    }

    @Override
    protected Serializable pkVal() {
        return this.resId;
    }

    @Override
    public String toString() {
        return "Resource{" +
        ", resId=" + resId +
        ", resName=" + resName +
        ", resUrl=" + resUrl +
        ", resParent=" + resParent +
        ", resLevel=" + resLevel +
        ", resDelete=" + resDelete +
        "}";
    }
}
